package fr.ralmn.OgameDroid.Frame;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.ListFragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import fr.ralmn.OgameDroid.R;
import fr.ralmn.OgameDroid.Util;
import fr.ralmn.OgameDroid.Object.Objects;
import fr.ralmn.OgameDroid.Object.Technologie;
import fr.ralmn.OgameDroid.Object.Dependence.RequireItemBatiments;
import fr.ralmn.OgameDroid.Object.Dependence.RequireItemTechno;
import fr.ralmn.OgameDroid.list.Adapter.RequireBArrayAdapter;

public class Techno_Batiments extends ListFragment {

	public static Technologie technologie = Objects.Armes;
	private int LEVEL = 1;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		final View v = inflater.inflate(R.layout.requirelistlayout_b,
				container, false);
		//ListView lv = (ListView) v.findViewById(android.R.id.list);
		technologie = Util.getTechnologie(getActivity().getIntent().getExtras().getString("technologie"));
			
		
		RequireBArrayAdapter a = new RequireBArrayAdapter(v.getContext(),
				technologie.getRequire().getBatiments());
		setListAdapter(a);

		return v;
	}

}
